package com.jinly.ryder.jenkins.service.model;

import lombok.Data;

@Data
public class CommentMsg {
    private String comment;
    private String type;

    public CommentMsg(String commentLog) {
        int splitIndex = commentLog.indexOf(":");
        if (splitIndex > 0) {
            type = commentLog.substring(0, splitIndex);
            comment = commentLog.substring(splitIndex);
        } else {
            type = "other";
            comment = commentLog;
        }
    }
}
